import upload from '@/utils/upload';
import { request, requestLg } from '@/utils/request';

// 用户密码重置
export function updateUserPwd(datas) {
  return requestLg({
    url: '/system/auth/update-password',
    method: 'POST',
    data: datas
  });
}
// 查询用户权限
export function getUserAuthority() {
  return requestLg({
    url: '/system/auth/list-menus',
    headers: {
      isToken: true
    },
    method: 'GET'
  });
}

// 获取用户详细信息
export function getInfo() {
  return requestLg({
    url: '/system/auth/get-permission-info',
    method: 'GET',
    headers: {
      isToken: true
    }
  });
}

// 换令牌
export function refreshTokenNew(ref) {
  return request({
    url: '/system/auth/refresh-token?refreshToken=' + ref,
    method: 'POST'
  });
}
